Python Read Data From Text File (2 Ways)
Toreadafile'scontents,callf.read(size),whichreadssomequantityofdataandreturnsitasastring(intextmode)orbytesobject(inbinarymode).,TheSolutionopen(dna.txt,r)opensthefileinreadmode(r)....file.read()readstheentirecontentsofthefileintoastring.replace(...。參考影片的文章的如下: